package com.zhengjiang.nacos.order.controller;

import com.zhengjiang.nacos.order.model.Order;
import com.zhengjiang.nacos.order.service.OrderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;


@RestController
@RequestMapping("order")
public class OrderContoller {

    @Autowired
    private OrderService orderService;

    @PostMapping("/submit")
    public String submitOrder(@RequestBody Order order){
        orderService.submitOrder(order);
        return "success";
    }

}
